<!-- CKeditor 编辑器挂件 -->
<script src="{$tpl_replace_string.__STATIC_PATH__}/ckEditor/build/ckeditor.js?ver={$tpl_replace_string.__STATIC_VER__}"></script>
<link  rel="stylesheet" href="{$tpl_replace_string.__STATIC_PATH__}/ckEditor/build/styles.css?ver={$tpl_replace_string.__STATIC_VER__}" />
{$textArea}
<script type="text/javascript">
    var textAreaID = '#{$domAttrs.id}';
    var editor;
    ClassicEditor.
    create( document.querySelector( textAreaID ),{
//            toolbar: ['imageUpload','link'],
        ckfinder: {
            uploadUrl : '/Upload/ckEditorUplaodImg'
            //后端处理上传逻辑返回json数据,包括uploaded(选项true/false)和url两个字段
        },
        autosave: {
            save( editor ) {
                //return saveData( editor.getData() );
            }
        },
    } )
        .then( newEditor => {
            editor = newEditor;
            console.log( editor );
        } )
        .catch( error => {
            console.error( error );
        } );
</script>